Optimal. Leaf size=57 \[ -b d n x-\frac {b e n x^{1+r}}{(1+r)^2}+d x \left (a+b \log \left (c x^n\right )\right )+\frac {e x^{1+r} \left (a+b \log \left (c x^n\right )\right )}{1+r} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.02, antiderivative size = 57, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 2, integrand size = 18, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.111, Rules used = {2350, 12}
\begin {gather*} d x \left (a+b \log \left (c x^n\right )\right )+\frac {e x^{r+1} \left (a+b \log \left (c x^n\right )\right )}{r+1}-b d n x-\frac {b e n x^{r+1}}{(r+1)^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 2350
Rubi steps
\begin {align*} \int \left (d+e x^r\right ) \left (a+b \log \left (c x^n\right )\right ) \, dx &=\left (d x+\frac {e x^{1+r}}{1+r}\right ) \left (a+b \log \left (c x^n\right )\right )-(b n) \int \frac {d+d r+e x^r}{1+r} \, dx\\ &=\left (d x+\frac {e x^{1+r}}{1+r}\right ) \left (a+b \log \left (c x^n\right )\right )-\frac {(b n) \int \left (d+d r+e x^r\right ) \, dx}{1+r}\\ &=-b d n x-\frac {b e n x^{1+r}}{(1+r)^2}+\left (d x+\frac {e x^{1+r}}{1+r}\right ) \left (a+b \log \left (c x^n\right )\right )\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.06, size = 61, normalized size = 1.07 \begin {gather*} \frac {x \left (a (1+r) \left (d+d r+e x^r\right )-b n \left (d (1+r)^2+e x^r\right )+b (1+r) \left (d+d r+e x^r\right ) \log \left (c x^n\right )\right )}{(1+r)^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [C] Result contains higher order function than in optimal. Order 9 vs. order
3.
time = 0.08, size = 606, normalized size = 10.63
method | result | size |
risch | \(\frac {b x \left (d r +e \,x^{r}+d \right ) \ln \left (x^{n}\right )}{1+r}-\frac {x \left (-2 x^{r} a e +2 b d n +2 x^{r} b e n -2 x^{r} a e r -2 a d +4 b d n r -4 \ln \left (c \right ) b d r -2 \ln \left (c \right ) b d \,r^{2}-2 a d \,r^{2}-2 d b \ln \left (c \right )-2 \ln \left (c \right ) b e \,x^{r} r -4 a d r -i \pi b d \,r^{2} \mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2}-i \pi b e \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2} x^{r}-i \pi b e \,\mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2} x^{r}-i \pi b d \,r^{2} \mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2}-2 i \pi b d \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2} r -2 i \pi b d \,\mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2} r +i \pi b d \mathrm {csgn}\left (i c \,x^{n}\right )^{3}+2 b d n \,r^{2}+i \pi b e \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right ) x^{r}-i \pi b e \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2} x^{r} r -i \pi b e \,\mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2} x^{r} r +i \pi b d \,r^{2} \mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )+2 i \pi b d \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right ) r -2 \ln \left (c \right ) b e \,x^{r}+i \pi b e \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right ) x^{r} r +2 i \pi b d \mathrm {csgn}\left (i c \,x^{n}\right )^{3} r +i \pi b d \,r^{2} \mathrm {csgn}\left (i c \,x^{n}\right )^{3}+i \pi b e \mathrm {csgn}\left (i c \,x^{n}\right )^{3} x^{r}+i \pi b d \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )-i \pi b d \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2}-i \pi b d \,\mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2}+i \pi b e \mathrm {csgn}\left (i c \,x^{n}\right )^{3} x^{r} r \right )}{2 \left (1+r \right )^{2}}\) | \(606\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.29, size = 68, normalized size = 1.19 \begin {gather*} -b d n x + b d x \log \left (c x^{n}\right ) + a d x + \frac {b e x^{r + 1} \log \left (c x^{n}\right )}{r + 1} - \frac {b e n x^{r + 1}}{{\left (r + 1\right )}^{2}} + \frac {a e x^{r + 1}}{r + 1} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 136 vs.
\(2 (59) = 118\).
time = 0.39, size = 136, normalized size = 2.39 \begin {gather*} \frac {{\left (b d r^{2} + 2 \, b d r + b d\right )} x \log \left (c\right ) + {\left (b d n r^{2} + 2 \, b d n r + b d n\right )} x \log \left (x\right ) + {\left ({\left (b r + b\right )} x e \log \left (c\right ) + {\left (b n r + b n\right )} x e \log \left (x\right ) - {\left (b n - a r - a\right )} x e\right )} x^{r} - {\left (b d n + {\left (b d n - a d\right )} r^{2} - a d + 2 \, {\left (b d n - a d\right )} r\right )} x}{r^{2} + 2 \, r + 1} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 323 vs.
\(2 (54) = 108\).
time = 0.48, size = 323, normalized size = 5.67 \begin {gather*} \begin {cases} \frac {a d r^{2} x}{r^{2} + 2 r + 1} + \frac {2 a d r x}{r^{2} + 2 r + 1} + \frac {a d x}{r^{2} + 2 r + 1} + \frac {a e r x x^{r}}{r^{2} + 2 r + 1} + \frac {a e x x^{r}}{r^{2} + 2 r + 1} - \frac {b d n r^{2} x}{r^{2} + 2 r + 1} - \frac {2 b d n r x}{r^{2} + 2 r + 1} - \frac {b d n x}{r^{2} + 2 r + 1} + \frac {b d r^{2} x \log {\left (c x^{n} \right )}}{r^{2} + 2 r + 1} + \frac {2 b d r x \log {\left (c x^{n} \right )}}{r^{2} + 2 r + 1} + \frac {b d x \log {\left (c x^{n} \right )}}{r^{2} + 2 r + 1} - \frac {b e n x x^{r}}{r^{2} + 2 r + 1} + \frac {b e r x x^{r} \log {\left (c x^{n} \right )}}{r^{2} + 2 r + 1} + \frac {b e x x^{r} \log {\left (c x^{n} \right )}}{r^{2} + 2 r + 1} & \text {for}\: r \neq -1 \\a d x + \frac {a e \log {\left (c x^{n} \right )}}{n} - b d n x + b d x \log {\left (c x^{n} \right )} + \frac {b e \log {\left (c x^{n} \right )}^{2}}{2 n} & \text {otherwise} \end {cases} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 2.45, size = 115, normalized size = 2.02 \begin {gather*} \frac {b n r x x^{r} e \log \left (x\right )}{r^{2} + 2 \, r + 1} + b d n x \log \left (x\right ) + \frac {b n x x^{r} e \log \left (x\right )}{r^{2} + 2 \, r + 1} - b d n x - \frac {b n x x^{r} e}{r^{2} + 2 \, r + 1} + b d x \log \left (c\right ) + \frac {b x x^{r} e \log \left (c\right )}{r + 1} + a d x + \frac {a x x^{r} e}{r + 1} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.02 \begin {gather*} \int \left (d+e\,x^r\right )\,\left (a+b\,\ln \left (c\,x^n\right )\right ) \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________